# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import sys
reload(sys)
sys.setdefaultencoding('utf8')

from django.contrib import admin
from wxapp.models import GoodsDetail,ServiceDetail,ShoppingCartDetail,UserDetail

# Register your models here.

class GoodsDetailAdmin(admin.ModelAdmin):
	list_display = ('goods_id', 'goods_name', 'goods_price', 'goods_cost', 'goods_num', 'sell_num', 'goods_type', 'belong_car', 'publish_time', 'goods_discount', 'goods_status', 'pic_path')
	fields = ('goods_name', 'goods_price', 'goods_cost', 'goods_num', 'sell_num', 'goods_type', 'belong_car', 'publish_time', 'goods_discount', 'goods_status', 'pic_path')

class ServiceDetailAdmin(admin.ModelAdmin):
	list_display = ('service_id', 'service_name', 'service_type', 'service_price','service_status','pic_path')
	fields = ('service_name', 'service_type', 'service_price','service_status','pic_path')

class ShoppingCartDetailAdmin(admin.ModelAdmin):
	list_display = ('cart_id', 'user_id','user_phone', 'goods_id', 'goods_num','goods_price','join_time')
	fields = ('user_id','user_phone', 'goods_id', 'goods_num','goods_price','join_time')

class UserDetailAdmin(admin.ModelAdmin):
	list_display = ('user_id','user_name')
	fields = ('user_name',)



admin.site.register(GoodsDetail, GoodsDetailAdmin)
admin.site.register(ServiceDetail, ServiceDetailAdmin)
admin.site.register(ShoppingCartDetail, ShoppingCartDetailAdmin)
admin.site.register(UserDetail, UserDetailAdmin)